----------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\Eric Zou\Dropbox\replicate_smokelabor/2_analysis/output_logs/figure2.log
  log type:  text
 opened on:  27 Jun 2022, 12:30:37

. 
.         use "$Rep_smokelabor/1_build/regdata/county_day.dta", clear

.         
.         tsset countyfip rfrnc_dt
       panel variable:  countyfip (strongly balanced)
        time variable:  rfrnc_dt, 01jan2007 to 31dec2019, but with gaps
                delta:  1 day

.         
.         reghdfe pm25 F(20(-1)1).hms_deep hms_deep L(1(1)20).hms_deep, a(county_doy st_yr) cluster(COUNTY10 rfrnc_dt) 
(dropped 38677 singleton observations)
(MWFE estimator converged in 13 iterations)

HDFE Linear regression                            Number of obs   =  3,968,857
Absorbing 2 HDFE groups                           F(  41,   1678) =      22.82
Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                  R-squared       =     0.3557
                                                  Adj R-squared   =     0.2487
Number of clusters (COUNTY10) =      1,679        Within R-sq.    =     0.0402
Number of clusters (rfrnc_dt) =      4,269        Root MSE        =     5.0454

                  (Std. Err. adjusted for 1,679 clusters in COUNTY10 rfrnc_dt)
------------------------------------------------------------------------------
             |               Robust
        pm25 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    hms_deep |
        F20. |    -.13924   .0849853    -1.64   0.102    -.3059284    .0274484
        F19. |  -.1555588   .0827879    -1.88   0.060    -.3179371    .0068196
        F18. |  -.2670074   .0849073    -3.14   0.002    -.4335428    -.100472
        F17. |  -.2543973   .0877457    -2.90   0.004    -.4264999   -.0822946
        F16. |  -.1274973   .0884714    -1.44   0.150    -.3010233    .0460286
        F15. |   .0592053   .0884531     0.67   0.503    -.1142846    .2326953
        F14. |  -.0397727   .0851727    -0.47   0.641    -.2068286    .1272831
        F13. |   -.006082   .0851835    -0.07   0.943    -.1731592    .1609952
        F12. |   .0267388   .0900533     0.30   0.767    -.1498898    .2033673
        F11. |   .0192209   .0873497     0.22   0.826     -.152105    .1905468
        F10. |  -.0089221   .0889518    -0.10   0.920    -.1833903    .1655461
         F9. |   .0661886   .0852817     0.78   0.438    -.1010811    .2334583
         F8. |   .0704212   .0860789     0.82   0.413    -.0984121    .2392545
         F7. |  -.0564423   .0884647    -0.64   0.524     -.229955    .1170704
         F6. |   .0282589   .0861762     0.33   0.743    -.1407653    .1972831
         F5. |   .0930857   .0896602     1.04   0.299    -.0827719    .2689433
         F4. |   .0989989   .0933341     1.06   0.289    -.0840646    .2820624
         F3. |   .2582869   .0926171     2.79   0.005     .0766296    .4399441
         F2. |   .1897185   .0901356     2.10   0.035     .0129284    .3665085
         F1. |   .8004876   .0972543     8.23   0.000      .609735    .9912401
         --. |   2.188863   .1081215    20.24   0.000     1.976796     2.40093
         L1. |   1.692388   .1000907    16.91   0.000     1.496072    1.888704
         L2. |   .8913148    .094675     9.41   0.000     .7056212    1.077008
         L3. |   .3515631   .0884743     3.97   0.000     .1780314    .5250948
         L4. |   .3775086   .0851389     4.43   0.000     .2105189    .5444983
         L5. |   .2339303   .0896761     2.61   0.009     .0580415    .4098192
         L6. |  -.0064254   .0907176    -0.07   0.944    -.1843569    .1715062
         L7. |  -.0001089   .0883217    -0.00   0.999    -.1733412    .1731235
         L8. |   .0482128   .0873027     0.55   0.581    -.1230209    .2194464
         L9. |    .118954   .0902568     1.32   0.188    -.0580738    .2959819
        L10. |   .0378898   .0900215     0.42   0.674    -.1386765    .2144561
        L11. |   .0274762   .0880461     0.31   0.755    -.1452156     .200168
        L12. |  -.0990215   .0885643    -1.12   0.264    -.2727295    .0746866
        L13. |    .103842   .0865477     1.20   0.230    -.0659109    .2735949
        L14. |   .1252502   .0840928     1.49   0.137    -.0396877     .290188
        L15. |   .0647606   .0864558     0.75   0.454    -.1048121    .2343332
        L16. |  -.0392076   .0900514    -0.44   0.663    -.2158326    .1374174
        L17. |    -.17141   .0889907    -1.93   0.054    -.3459545    .0031344
        L18. |  -.0914891   .0921205    -0.99   0.321    -.2721723    .0891942
        L19. |  -.1301368   .0868661    -1.50   0.134    -.3005141    .0402406
        L20. |  -.1265743    .090159    -1.40   0.161    -.3034103    .0502617
             |
       _cons |    8.52623   .0404877   210.59   0.000     8.446818    8.605641
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
 Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
  county_doy |    564495      564495           0    *|
       st_yr |       637           0         637     |
-----------------------------------------------------+
* = FE nested within cluster; treated as redundant for DoF computation

.         summ pm25 if e(sample)

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        pm25 |  3,968,857    8.946849    5.820815       -9.7   393.8848

.         
.         ** plot 
.         import excel using "$Rep_smokelabor/2_analysis/output_figures/figure2.xlsx", clear sheet("pm25") first
(4 vars, 41 obs)

.         
.         tw      line l u eday, col(teal%70 teal%70) lp(dash dash) || ///
>                 connected b eday, col(blue) msize(0.8) ///
>                 xtitle("Days since smoke exposure") ytitle("Change in PM2.5 (ug/m3)") ///
>                 xline(0, lcol(black) lp(dot) lw(0.6)) ///
>                 yline(0, lcol(black) lp(dot) lw(0.6)) ///
>                 ylab(, nogrid) ///
>                 legend(off) ///
>                 graphregion(col(white))

.         gr export "$Rep_smokelabor/2_analysis/output_figures/figure2.pdf", replace
(file C:\Users\Eric Zou\Dropbox\replicate_smokelabor/2_analysis/output_figures/figure2.pdf written in PDF format)

.         
. log close 
      name:  <unnamed>
       log:  C:\Users\Eric Zou\Dropbox\replicate_smokelabor/2_analysis/output_logs/figure2.log
  log type:  text
 closed on:  27 Jun 2022, 12:37:03
----------------------------------------------------------------------------------------------------------------------------------------------------
